<template>
  <van-overlay class="page-overlay flex-row-c" :show="show">
    <van-loading class="" :color="color">
      <span>{{ content }}</span>
    </van-loading>
  </van-overlay>
</template>

<script setup>
import { Loading as VanLoading, Overlay as VanOverlay } from 'vant';
import { ref } from 'vue';

defineProps({
  show: {
    type: Boolean,
    default: false
  },
  content: {
    type: String,
    default: '加载中...'
  },
  close: {
    type: Function,
    default: fun => fun()
  },
  color: {
    type: String,
    default: '#fff'
  }
});
const emit = defineEmits(['update:show']);

const handleClose = () => {
  emit('update:show', false);
};
// 使用toRefs解构
// let { } = { ...toRefs(data) }
</script>
<style lang="scss">
.my-loading {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999999;
  height: 100vh;
  width: 100vw;
}
</style>
